package com.bilgeadam.mvc.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author Bora SAYINER
 * @since Jan 3, 2015 7:24:14 PM
 * @version 1.0
 */
public abstract class GenericHttpServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		handleRequest(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		handleRequest(req, resp);
	}

	protected abstract void handleRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException;
}
